package com.ykh.mybbsdemo.service;

import com.ykh.mybbsdemo.dao.pojo.po.SysUser;
import com.ykh.mybbsdemo.dao.pojo.vo.Result;
import com.ykh.mybbsdemo.dao.pojo.dto.ArticleParam;
import com.ykh.mybbsdemo.dao.pojo.dto.PageParams;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-29
 * Time: 20:54
 */
public interface ArticleService {
    /**
     * 分页查询文章列表
     * @param pageParams
     * @return
     */
    //显示首页的文章列表
    Result listArticle(PageParams pageParams);

    //查找最热文章
    Result hotArticle();

    //查找最新文章
    Result newArticles(int limit);

    //文章归档
    Result listArchives();

    //查看文章详情
    Result findArticleById(long articleId);

    //发布文章
    Result publish(ArticleParam articleParam);

    //查看当前登录的用户的文章
    Result getMyArticle(PageParams pageParams, SysUser sysUser);

//    Result updateArticle(ArticleVo articleVo);

    //删除文章
    Result deleteById(long id);

    Result likeArticle(String quary);
}
